﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 接收用户的输入
{
    class Program
    {
        static void Main(string[] args)
        {
            // string quick = "quick";
            Hashtable ht = new Hashtable();
            int i = 1;
            while (true)
            {
                Console.WriteLine("按任意键继续，按Q退出");
                string start = Console.ReadLine();

                switch (start)
                {
                    case "q":
                        return;
                    case "Q":
                        return;
                    default:
                        Console.WriteLine("请输入姓名：");
                        string name = Console.ReadLine();
                        ht.Add(i, name);
                        i++;
                        foreach (var item in ht.Keys)
                        {
                            Console.WriteLine("{0}  {1}", item, ht[item]);
                        }
                        break;
                }

            }

        }
    }
}
